ObjectDB Database Search

101-150 of 200 results

composite index not used in query

and a.startDate ?1)) the composite index is not used, query plan:  Step 1: Process Action (a) instances ------------------------------------ [ Step 1a] Scan index com.agile.hummingbird.Action[startDate] locating all the Action (a) instances. [ Step 1b] Filter the results of step 1a retaining

Performance issue in a query due to compareTo calls

WHERE v. step .stepNumber = ? is very slow in comparing to the query: SELECT v FROM Values v WHERE v ... = CascadeType.REMOVE) private Values valuesRef; }   @Index (members = {" step .stepNumber"}) @Entity ... ; @OneToOne (fetch = FetchType.EAGER) private TCStep step ; //For performance reasons, we use a list

no query result

============================ [ Step 1] Scan index com.agile.hummingbird.Action[endDate] locating all the Action (a) instances. [ Step 2] Retrieve fields in Action (a) instances. [ Step 3] Filter the results of step 2 retaining only results that satisfy: (a.transferred=0). [ Step 4] Filter the results of step

Entity can be found by find() but not by query

and sometimes we don't get the entity by query. Have you an idea what happens here?   btc_es BTC EmbeddedSystems

Slow searching with two indexes

where receiver == :r order by id desc Query Plan Description ====================== [ Step 1] Scan index com ... : (this.receiver==:r). [ Step 2] Order the results of step 1 by : desc(any(any(this.id))). [ Step 3] Apply ... NmeaBatch where receiver == :r order by id desc Query Plan Description ====================== [ Step 1

JPA Class Enhancer

The ObjectDB Enhancer is a post-compilation tool that improves performance by modifying ... directly accessing persistent fields of other classes. This practice is required by the JPA specification but not enforced by ObjectDB. Instead, use the accessor and mutator methods of the desired class

Paths and Types in JPQL and Criteria API

classes) are represented in JPQL by the following types of expressions: Variables : FROM ... persistent classes can participate in direct comparisons by using the = and operators ... by all six comparison operators and used for ordering . Navigation through path expressions A path

JPA Primary Key

and can be retrieved by the combination of its type and its primary key. Primary key values must be unique for each ... part of their containing entities and do not have a separate identity. Automatic primary key By default ... value by declaring a primary key field: @Entity public class Project { @Id @GeneratedValue long id

Query Parameters in JPA

a Country object from the database by its name: public Country getCountryByName( EntityManager em ... a value for the parameter by using the setParameter method. The setParameter method supports method chaining by returning the TypedQuery instance on which it was invoked. This allows you to chain

Storing JPA Entities

Using Jakarta Persistence (JPA) You can store new entities in the database either explicitly by ... . The exception is thrown either by persist , if the existing entity is currently managed by the EntityManager , or by commit . Referenced embedded objects The following code stores an Employee instance

JPA Shared (L2) Entity Cache

a second-level (L2) cache of entities, which is managed by the EntityManagerFactory and shared by ... and are shared by all EntityManagerFactory and EntityManager instances for that database ... value. Persistence Unit Settings You can also enable or disable the shared cache by using a persistence

ObjectDB Object Database Features

Databases are also supported by ObjectDB. The combination of Object Database features ... (limited only by operating system resources). Unlimited CPUs and cores. Reliability and Stability Recovery from failure by using a  recovery file and double writing. Additional recovery layer

Managing JPA Entities

when it is persisted to the database by using an EntityManager 's persist method, which must be invoked ... about making changes to entities. A managed entity can be marked for deletion by using ... is retrieval by refresh , which always requires database access. The main role of the persistence context

Detached JPA Entities

Detached entities are objects in a special state where they are not managed by an EntityManager ... have limited functionality: Many JPA methods, for example, lock , do not accept detached objects. Retrieval by ... EntityManager instances. Explicit detach You can detach an entity by using the detach method: em

JPA Connections and Transactions

A connection to a database is represented by an EntityManager instance, which also provides methods ... connection by using a separate EntityManager instance for each HTTP request. The main role ... transactions. Transactions are managed by an EntityTransaction instance, which is obtained from

ObjectDB Website - Terms and Conditions of Use

1. Terms By accessing and using this web site, you agree to be bound by these web site Terms ... from using or accessing this site. The materials contained in this web site are protected by ... of these restrictions and may be terminated by ObjectDB Software at any time. Upon terminating your viewing

SELECT clause (JPQL / Criteria API)

query returns Country objects, which then become managed by the EntityManager instance em : TypedQuery ... directly. However, you can add their content to the SELECT clause by using a bound JOIN variable in ... with the containing entities. Therefore, embedded objects that are retrieved directly by a result path expression

Setting and Tuning of JPA Queries

method specifies the starting point of the result window by defining how many results to skip from ... because the setter methods in Query and TypedQuery support method chaining by returning the query object on which they were invoked. Flush mode (setFlushMode) Changes made to a database by using an EntityManager

JPA Criteria Queries

; CriteriaQuery , CriteriaUpdate , and  CriteriaDelete are first built by static methods ... to define SELECT, WHERE , GROUP BY , and ORDER BY clauses. To execute the query, pass the instance ... (Note: Subqueries are currently not supported by ObjectDB). Top-level queries and subqueries share

Database Server

database is accessed only by a single web application, it should be embedded in that application ... Chapter 6 . You can override this by specifying a configuration path on the command line: $ java com ... . For example, you can increase the maximum JVM heap size and improve performance by using the HotSpot JVM

Query on primary key is slow when using 'IN'

of step 4 by : d. [ Step 6] Remove duplicates from the groups of step 5. [ Step 7] Apply selection ... = '1344770') Query plan 1/2 description ============================ [ Step 1] Scan type eu.extech ... that satisfy: (d.productVariantOid='1344770'). [ Step 2] Scan type eu.extech.quant.product_variants.data

Database Transaction Replayer

files). Recording is disabled by default and can be enabled in the configuration . The ObjectDB Replayer ... . This feature is useful for two purposes: Recovering from a database failure by replaying the recorded operations. Reproducing problems during debugging by repeating a failure. Recording transactions

JPA Query Structure (JPQL / Criteria)

of up to six clauses in the following format: SELECT ... FROM ... [WHERE ...] [GROUP BY ... [HAVING ...]] [ORDER BY ...] The SELECT and FROM clauses are required in every query that retrieves data; update and delete queries have a slightly different structure. The other JPQL clauses-- WHERE , GROUP BY

Literals in JPQL and Criteria Queries

) numeric literals. This feature is not supported by all JPA implementations. String literals JPQL ... , 'Adam' or '' ), and a single quotation mark within a string is represented by two single quotation ... escape characters (for example, "Adam\'s" and "abcd 1234" ). However, this syntax is not supported by

JPA Criteria Query Selection and Results

and ordering, mirroring the SELECT and ORDER BY clauses in JPQL or SQL. These interfaces allow you to specify ... ;the result as an array of objects or as individual values by  index, alias string or ... of this selection in result tuples, rather than by index or string that are considered

Online Backup

Because an ObjectDB database is stored as a single file in the file system, you can back it up by ... it is not open in an ObjectDB server or in use by any application. ObjectDB also supports online ... You can start an online backup by executing a special query on an EntityManager ( em ) instance

Updating JPA Entities

that are referenced by modified entities through fields that are marked with CascadeType . PERSIST or ... an entity by modifying it within an active transaction. You do not need to invoke an EntityManager method ... classes are enhanced. Therefore, for efficiency, ObjectDB by default ignores array changes

JPA Criteria API Queries

are defined as strings, similar to SQL. In contrast, JPA Criteria queries are defined by instantiating ... ); List results = query. getResultList (); Because both types of queries are ultimately represented by ... equivalent clauses, this guide explains them side- by -side in the Query Structure pages. The following

2.9.x query issue with @Unique constraint

: (u.userName=:userName). [ Step 2] Order the results of step 1 by : u. [ Step 3] Use NULL as a result ... for :userName parameter 2.8.9 Query plan description ============================ [ Step 1] Scan type User locating all the User (u) instances. [ Step 2] Evaluate fields in User (u) instances. [ Step 3

Logical Operators in JPQL and Criteria API

, while Java uses its own notation, which is also used by the JDO Query Language (JDOQL). ObjectDB ... , Boolean expressions are represented by the Expression interface and its descendants. For example, a Boolean path (a field or property) is represented by Path : Path isInUN = country. get ("isInUN

Best practise loading big data

. Creating and traversing. For the traversing we access the data block by block - in each block step by step and in each step value by value. When do this within one transaction without holding ... s : sb. steps ) { MyValue v : s.values. get ( 0 ); } } The values are not referenced by

Mapped by fields are not initialized by JOIN FETCH in queries

As demonstrated in this forum thread , a mapped by collection field with lazy fetch mode is not initialized in results of a query that uses JOIN FETCH on that collection field (when enhancement is used). support Support   Build 2.4.1_06 fixes this issue (fields are now initialized

Issue with UPPER ?

====================== Step 1: Process Mitglied ($1) instances --------------------------------------- [ Step 1a] Scan ... ) instances. [ Step 1b] Evaluate fields in Mitglied ($1) instances. Step 2: Process IndividualProfile ($3) instances   (for every result of step 1

jakarta.persistence.EntityManager

via a call to close , to allow resources to be cleaned up by the persistence provider. This approach places ... EntityManager may be obtained by dependency injection, using PersistenceContext . // inject the container ... the EntityTransaction obtained by calling getTransaction . A complete idiom for custom application

Database Replication and Clustering

master databases, slave databases ( by using one or more elements), and databases that are not ... by a server on localhost:6000 and a slave database managed by a server on localhost:6001 . In ... ;user=b;password=b" ); A composite URL contains two or more database URLs separated by a pipe character

JPA Named Queries

named queries instead of dynamic queries can improve code organization by separating JPQL query ... , you should choose names carefully to avoid collisions, for example, by using the unique entity name as ... Queries at Runtime At runtime, named queries are represented by the Query and TypedQuery interfaces

Chapter 6 - Configuration

: The configuration path By default, the configuration file is loaded from $objectdb/objectdb.conf ... . You can also define $objectdb explicitly by setting the objectdb.home system property: System.setProperty ... an argument to the JVM: $ java "-Dobjectdb.home=/odb" ... The configuration file By default

Entity Management Settings

attribute specifies how non-enhanced classes are handled. ObjectDB can manage non-enhanced classes by ... . The valid values are "weak" , "soft" , and "strong" . Modified entities are always held by strong ... attribute specifies the size of the shared level-2 cache that is managed by

JPA Persistence Unit

is optional when using ObjectDB but required by JPA. Programmatic configuration ... useful for microservices, dynamic environments, or applications where configuration is managed by ... .xml packedEntity.jar sample.MyEntity1 sample.MyEntity2 A persistence unit is defined by

JPA Exceptions

manage broad persistence issues by using the base class. The exception hierarchy is as follows ... and locking exceptions Lock acquisition failures during updates or retrieval are indicated by : Thrown ... : Thrown by Query.getSingleResult() when the query returns no results. Thrown by Query.getSingleResult

SSL Configuration

the example, SSL is disabled by default. Enable SSL when accessing remote ObjectDB databases ... by using the JDK keytool utility: https://docs.oracle.com/javase/6/docs/technotes/tools/solaris/keytool.html By using these keystore and truststore files, a client can verify during the SSL handshake

Slow query due to scanning multiple indexes

that satisfy: (p.rackOID='826268'). [ Step 3] Order the results of step 2 by : p. [ Step 4] Merge ... .rackOID = "826268" Query plan 1/2 description ============================ [ Step 1] Scan index eu.extech ... ) instances that satisfy: (p.rackOID='826268'). [ Step 2] Apply selection and prepare final results. '826268

JPA Named Queries Annotations

of the ObjectDB Manual. Query references Access named queries in the application by name or by using ... . Retrieve it by result type from EntityManagerFactory.getNamedQueries , and use it to get a TypedQuery instance via EntityManager.createQuery .

Is ObjectDB better than competing object databases?

of the Java Data Objects (JDO) API than competing object databases. By using a standard API such as JPA ... relational database by using an ORM JPA provider such as Hibernate, EclipseLink or Open JPA ... . The support of two standard APIs (JPA and JDO) by ObjectDB minimizes the risk

JPA Query Expressions (JPQL / Criteria)

JPQL and criteria queries are built on query expressions. Every query consists of clauses , such as SELECT , FROM , WHERE , GROUP BY , HAVING , and ORDER BY . Each clause is composed of JPQL or ... of at least one atomic component. More complex query expressions are built by combining atomic expressions

Index Definition

A composite index is an index on more than one persistent field. Define a composite index by specifying ... is sorted lexicographically by word, not by word length. In summary, if an index contains all the fields in

What is the Java Persistence API (JPA)?

) is that in JPA data is represented by classes and objects rather than by tables and records as in ... of the Java Persistence API (JPA). By interacting with ObjectDB using standard JPA

Java EE Web Tutorial

can sign the guestbook by filling a simple form. The visitors that have already signed are listed below the form: Persistence is managed by JPA. Every visitor that has signed the guestbook is represented by a  Guest entity and all the  Guest entities are stored in an ObjectDB database

[ODB1] Chapter 1 - About ObjectDB

Compliant ObjectDB is compliant with the JDO (Java Data Objects) standard, developed by Sun ... DB2 and Microsoft SQL Server. In addition, by using JDO you are backed up by a large community ... move your application to other platforms (Windows, Unix, Macintosh and almost any other platform), simply by taking

ObjectDB 1.0 Manual

technology by Sun Microsystems. The main purpose of this guide is to familiarise you with ObjectDB ... class is and which types are supported by JDO. Chapter 4 - JDO Metadata Shows how to define JDO ... you may want to extend your knowledge of JDO by reading the JDO specification or a book on JDO